package com.leon.security.service.impl;

import com.leon.security.service.RoleService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
@Service
public class RoleServiceImpl implements RoleService {
    @Override
    public List<String> findRolesByAid(Integer aid) {
        List<String> roleList = new ArrayList<>();
        roleList.add("ROLE_user");
        if(aid!=3){
            roleList.add("ROLE_admin");
            if(aid==1){
                roleList.add("ROLE_superAdmin");
            }
        }
        return roleList;
    }
}
